#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Sep 14 23:22:40 2022

@author: mac1444
"""
import sympy
import math
x= sympy.Symbol('x')#x==r
y= sympy.Symbol('y')#y==sita
M=10
m=1
N=11
n=0
res1=0
res2=0
res=0

def f(x,y):print(x)
def F(x,y):print(y)

    
for m in range(M):
    for n in range(N):
        res1=res1-0.8165**n
        print(res1)
        print("--------")
for m in range(M):
    for n in range(N):
        p=sympy.simplify((math.pi*2)*x*10**5)
        c=sympy.simplify(sympy.cos(y-math.pi*m/10))
        res2=res2-(0.8165**n)*sympy.cos(p*c+math.pi)
        ##res2=res2-(0.8165**n)*sympy.cos((math.pi*2)*x*10**5*sympy.cos(y-math.pi*m/10)+math.pi)
        print(res2)
        print("------------")
res=res1+res2
print(res)